﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QuickWPFMonthCalendar.DB
{
    public class Query
    {
        public static string InsertDiary = "INSERT INTO Diary (Body,DateFormat,LastUpdate) VALUES (@Body,@DateFormat,@LastUpdate);";

        public static string UpdateDiary = "UPDATE Diary SET Body=@Body,LastUpdate=@LastUpdate WHERE DateFormat=@DateFormat";

        public static string SelectDiary = "SELECT * FROM DIARY";

        public static string DeleteDiary = "DELETE FROM DIARY WHERE id=@Id";

        public static string SelectDiaryOneDayForDate = "SELECT * FROM DIARY WHERE DateFormat=@DateFormat";

        public static string SelectDiaryOneDayForId = "SELECT * FROM DIARY WHERE Id=@Id";

        public static string InsertImages = "INSERT INTO images(Id_diary,Path) VALUES(@Id_diary,@Path)";

        public static string SelectImagesForId = "SELECT * FROM images WHERE id_diary=@id_diary";

        public static string DeleteImagesForId = "DELETE FROM images WHERE id_diary=@id_diary";

        public static string SelectSettings = "SELECt * FROM settings";

        public static string UpdateSettings = "UPDATE settings SET [Value]=@Value WHERE Id=@Id";

    }
}
